#ifndef _ATTRIBUTE_SET_H_
#define _ATTRIBUTE_SET_H_

#include "Attribute.h"
#include <set>

// set of attributes
class AttributeSet{
public:
	AttributeSet(){
		this->processed = false;
		this->data.clear();
	}

	AttributeSet(const AttributeSet &other){
		this->processed = other.processed;
		for(std::set<Attribute>::const_iterator i = other.data.begin(); i != other.data.end(); i++)
			this->data.insert(Attribute(*i));
	}
	~AttributeSet(){};
    std::set<Attribute> data;
	bool processed;

	bool operator==(const AttributeSet &other) const{
		if(this->data.size() != other.data.size())
			return false;
		for(std::set<Attribute>::const_iterator a = this->data.begin(); a != this->data.end(); a++){
			bool attributeFound = false;
			for(std::set<Attribute>::const_iterator b = other.data.begin(); b != other.data.end(); b++){
				if(*b == *a){
					attributeFound = true;
					break;
				}
			}
			if(attributeFound == false)
				return false;
		}
		return true;
	}

	bool operator!=(const AttributeSet &other) const{
		return !(*this == other);
	}
};

#endif